package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import lombok.Data;

/**
 * @desc AchievementGradeDto
 * @使用场景
 */
@Data
public class AchievementGradeDto extends BaseDto implements Serializable {

  /**
   * 成果等级ID
   */
  @ApiModelProperty("成果等级ID")
  private String achievementGradeId;

  /**
   * 成果等级编号
   */
  @ApiModelProperty("成果等级编号")
  private String achievementGradeNumber;

  /**
   * 成果等级名称
   */
  @ApiModelProperty("成果等级名称")
  private String achievementGradeName;

  /**
   * 成果等级介绍
   */
  @ApiModelProperty("成果等级介绍")
  private String achievementGradeDesc;

  /**
   * 排序
   */
  @ApiModelProperty("排序")
  private Long orderNumber;

  /**
   * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
   */
  @ApiModelProperty("主体生命周期")
  private String subjectLifeCycle;

  /**
   * 操作人就职记录ID
   */
  @ApiModelProperty("操作人就职记录ID")
  private String operationInductionId;

  /**
   * 操作时间
   */
  @ApiModelProperty("操作时间")
  private Date operateTime;

  /**
   * 成果类型等级关系ID
   */
  @ApiModelProperty("成果类型等级关系ID")
  private String typeGradeRelationshipId;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    AchievementGradeDto that = (AchievementGradeDto) o;
    return (
      achievementGradeId == that.achievementGradeId &&
      achievementGradeNumber == that.achievementGradeNumber &&
      achievementGradeName == that.achievementGradeName &&
      achievementGradeDesc == that.achievementGradeDesc &&
      orderNumber == that.orderNumber &&
      subjectLifeCycle == that.subjectLifeCycle &&
      operationInductionId == that.operationInductionId &&
      operateTime == that.operateTime &&
      typeGradeRelationshipId == that.typeGradeRelationshipId
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      achievementGradeId,
      achievementGradeNumber,
      achievementGradeName,
      achievementGradeDesc,
      orderNumber,
      subjectLifeCycle,
      operationInductionId,
      operateTime,
      typeGradeRelationshipId
    );
  }

}
